package com.springboot.demo.config;


import javax.servlet.*;
import javax.servlet.FilterConfig;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * @author wubc683
 * @desc
 * @date 2021-10-16 14:05
 */
public class ParamsFilter implements Filter {

    @Override
    public void init(FilterConfig config) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        ParameterRequestWrapper parmsRequest = new ParameterRequestWrapper( (HttpServletRequest) request);
        chain.doFilter(parmsRequest, response);

    }

    @Override
    public void destroy() {

    }

}
